<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Priithon.py.interpreter.Interpreter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="Priithon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/priithon">Priithon</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="Priithon-module.html">Package&nbsp;Priithon</a> ::
        <a href="Priithon.py-module.html">Package&nbsp;py</a> ::
        <a href="Priithon.py.interpreter-module.html">Module&nbsp;interpreter</a> ::
        Class&nbsp;Interpreter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="Priithon.py.interpreter.Interpreter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Interpreter</h1><p class="nomargin-top"><span class="codelink"><a href="Priithon.py.interpreter-pysrc.html#Interpreter">source&nbsp;code</a></span></p>
<center>
<center>  <map id="uml_class_diagram_for_priithon_65" name="uml_class_diagram_for_priithon_65">
<area shape="rect" id="node331" href="Priithon.py.interpreter.Interpreter-class.html#revision" title="Priithon.py.interpreter.Interpreter.revision" alt="" coords="17,164,577,183"/>
<area shape="rect" id="node331" href="Priithon.py.interpreter.Interpreter-class.html#__init__" title="Create an interactive interpreter object." alt="" coords="17,185,577,204"/>
<area shape="rect" id="node331" href="Priithon.py.interpreter.Interpreter-class.html#push" title="Send command to the interpreter to be executed." alt="" coords="17,204,577,223"/>
<area shape="rect" id="node331" href="Priithon.py.interpreter.Interpreter-class.html#runsource" title="Compile and run source code in the interpreter." alt="" coords="17,223,577,241"/>
<area shape="rect" id="node331" href="Priithon.py.interpreter.Interpreter-class.html#getAutoCompleteKeys" title="Return list of auto&#45;completion keycodes." alt="" coords="17,241,577,260"/>
<area shape="rect" id="node331" href="Priithon.py.interpreter.Interpreter-class.html#getAutoCompleteList" title="Return list of auto&#45;completion options for a command." alt="" coords="17,260,577,279"/>
<area shape="rect" id="node331" href="Priithon.py.interpreter.Interpreter-class.html#getCallTip" title="Return call tip text for a command." alt="" coords="17,279,577,297"/>
<area shape="rect" id="node1" href="Priithon.py.interpreter.Interpreter-class.html" title="Interpreter based on code.InteractiveInterpreter." alt="" coords="5,139,589,303"/>
<area shape="rect" id="node3" href="Priithon.py.interpreter.InterpreterAlaCarte-class.html" title="Demo Interpreter." alt="" coords="224,323,371,362"/>
<area shape="rect" id="node332" href="javascript:void(0);" title="Execute a code object." alt="" coords="183,39,411,57"/>
<area shape="rect" id="node332" href="javascript:void(0);" title="Display the syntax error that just occurred." alt="" coords="183,57,411,76"/>
<area shape="rect" id="node332" href="javascript:void(0);" title="Display the exception that just occurred." alt="" coords="183,76,411,95"/>
<area shape="rect" id="node332" href="javascript:void(0);" title="Write a string." alt="" coords="183,95,411,113"/>
<area shape="rect" id="node2" href="javascript:void(0);" title="Base class for InteractiveConsole." alt="" coords="171,6,421,119"/>
</map>
  <img src="uml_class_diagram_for_priithon_65.gif" alt='' usemap="#uml_class_diagram_for_priithon_65" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<p>Interpreter based on code.InteractiveInterpreter.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Priithon.py.interpreter.Interpreter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">locals</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">rawin</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">stdin</span>=<span class="summary-sig-default">sys.stderr</span>,
        <span class="summary-sig-arg">stdout</span>=<span class="summary-sig-default">sys.stderr</span>,
        <span class="summary-sig-arg">stderr</span>=<span class="summary-sig-default">sys.stderr</span>)</span><br />
      Create an interactive interpreter object.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.py.interpreter-pysrc.html#Interpreter.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Priithon.py.interpreter.Interpreter-class.html#push" class="summary-sig-name">push</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">command</span>)</span><br />
      Send command to the interpreter to be executed.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.py.interpreter-pysrc.html#Interpreter.push">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Priithon.py.interpreter.Interpreter-class.html#runsource" class="summary-sig-name">runsource</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">source</span>)</span><br />
      Compile and run source code in the interpreter.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.py.interpreter-pysrc.html#Interpreter.runsource">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="getAutoCompleteKeys"></a><span class="summary-sig-name">getAutoCompleteKeys</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Return list of auto-completion keycodes.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.py.interpreter-pysrc.html#Interpreter.getAutoCompleteKeys">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Priithon.py.interpreter.Interpreter-class.html#getAutoCompleteList" class="summary-sig-name">getAutoCompleteList</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">command</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwds</span>)</span><br />
      Return list of auto-completion options for a command.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.py.interpreter-pysrc.html#Interpreter.getAutoCompleteList">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Priithon.py.interpreter.Interpreter-class.html#getCallTip" class="summary-sig-name">getCallTip</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">command</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwds</span>)</span><br />
      Return call tip text for a command.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.py.interpreter-pysrc.html#Interpreter.getCallTip">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>code.InteractiveInterpreter</code></b>:
      <code>runcode</code>,
      <code>showsyntaxerror</code>,
      <code>showtraceback</code>,
      <code>write</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="revision"></a><span class="summary-name">revision</span> = <code title="'1.6'"><code class="variable-quote">'</code><code class="variable-string">1.6</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">locals</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">rawin</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">stdin</span>=<span class="sig-default">sys.stderr</span>,
        <span class="sig-arg">stdout</span>=<span class="sig-default">sys.stderr</span>,
        <span class="sig-arg">stderr</span>=<span class="sig-default">sys.stderr</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Priithon.py.interpreter-pysrc.html#Interpreter.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Create an interactive interpreter object.</p>
  <dl class="fields">
    <dt>Overrides:
        code.InteractiveInterpreter.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="push"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">push</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">command</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Priithon.py.interpreter-pysrc.html#Interpreter.push">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Send command to the interpreter to be executed.</p>
  <p>Because this may be called recursively, we append a new list onto the 
  commandBuffer list and then append commands into that.  If the passed in 
  command is part of a multi-line command we keep appending the pieces to 
  the last list in commandBuffer until we have a complete command. If not, 
  we delete that last list.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="runsource"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">runsource</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">source</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Priithon.py.interpreter-pysrc.html#Interpreter.runsource">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Compile and run source code in the interpreter.</p>
  <dl class="fields">
    <dt>Overrides:
        code.InteractiveInterpreter.runsource
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="getAutoCompleteList"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getAutoCompleteList</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">command</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kwds</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Priithon.py.interpreter-pysrc.html#Interpreter.getAutoCompleteList">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Return list of auto-completion options for a command.</p>
  <p>The list of options will be based on the locals namespace.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="getCallTip"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getCallTip</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">command</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kwds</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Priithon.py.interpreter-pysrc.html#Interpreter.getCallTip">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Return call tip text for a command.</p>
  <p>Call tip information will be based on the locals namespace.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="Priithon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/priithon">Priithon</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Mon Nov 22 14:59:44 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
